home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 February / february_2000.iso / site building / GoLive 4.0 Tryout / data1.cab / Apps / Modules / JScripts / Actions / Specials / Intersection.action < prev    next >
Encoding:
Text File  |  1999-08-05  |  5.5 KB  |  121 lines

  1. <html>
  2.  
  3.     <head>
  4.         <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
  5.         <meta name="generator" content="Adobe GoLive 4">
  6.         <title>Intersection Action</title>
  7.     </head>
  8.  
  9.     <body bgcolor="white">
  10.         <center>
  11.             <font size="6">Intersection Action</font><font>
  12.             <hr>
  13.             </font></center>
  14.         <p><font>
  15.         <csactionclass name="Intersection" function="CSLayerIntersect" nsversion="4" ieversion="4" actiontype="3"> </font></p>
  16.         <p><font>
  17.         <csactionparam name="layer1" type="GLActionLayerParam"> </font></p>
  18.         <p><font>
  19.         <csactionparam name="layer2" type="GLActionLayerParam"> </font></p>
  20.         <p><font></csactionclass>
  21.          </font></p>
  22.         <p>
  23.         <hr>
  24.         </p>
  25.         <p>IE Functions Script
  26.         <script language="JavaScript1.2" src="../../GlobalScripts/IE.scpt" cyberversion="N1.2"></script>
  27.         </p>
  28.         <p>StyleVis Functions Script
  29.         <script language="JavaScript1.2" src="../../GlobalScripts/StyleVis.scpt"></script>
  30.         </p>
  31.         <p>Intersection Action Main Script<font>
  32.         <script language="JavaScript1.2" cyberversion="N1.2"><!--
  33. function CSLayerIntersect (condition)
  34. {
  35.     var l1,t1,r1,b1,l2,t2,r2,b2;
  36.     if (IsIE()) {
  37.         var layer1=document.all.tags("div")[condition[1]];
  38.         var layer2=document.all.tags("div")[condition[2]];
  39.         l1=layer1.style.pixelLeft; t1=layer1.style.pixelTop; r1=layer1.offsetWidth+l1; b1=layer1.offsetHeight+t1;
  40.         l2=layer2.style.pixelLeft; t2=layer2.style.pixelTop; r2=layer2.offsetWidth+l2; b2=layer2.offsetHeight+t2;    
  41.     } else {
  42.         var layer1=CSNSStyl(condition[1]);
  43.         var layer2=CSNSStyl(condition[2]);
  44.         l1=layer1.x; t1=layer1.y; r1=layer1.clip.width+l1; b1=layer1.clip.height+t1;
  45.         l2=layer2.x; t2=layer2.y; r2=layer2.clip.width+l2; b2=layer2.clip.height+t2;
  46.     }
  47.     var w = (r1 < r2 ? r1 : r2) - (l1 > l2 ? l1 : l2)
  48.     var h = (b1 < b2 ? b1 : b2) - (t1 > t2 ? t1 : t2)
  49.     return ((w >= 0) && (h >= 0));
  50. }
  51. // -->
  52.         </script>
  53.         </font></p>
  54.         <p>
  55.         <hr>
  56.         </p>
  57.         <p> </p>
  58.         <p><font>
  59.         <table cool width="253" height="153" border="0" cellpadding="0" cellspacing="0" gridx="16" showgridx gridy="16" showgridy bgcolor="#eeeeee">
  60.             <tr height="1" cntrlrow>
  61.                 <td width="1" height="1"><spacer type="block" width="1" height="1"></td>
  62.                 <td width="9" height="1"><spacer type="block" width="9" height="1"></td>
  63.                 <td width="1" height="1"><spacer type="block" width="1" height="1"></td>
  64.                 <td width="80" height="1"><spacer type="block" width="80" height="1"></td>
  65.                 <td width="160" height="1"><spacer type="block" width="160" height="1"></td>
  66.             </tr>
  67.             <tr height="10">
  68.                 <td width="1" height="10"><spacer type="block" width="1" height="10"></td>
  69.                 <td width="9" height="10"><spacer type="block" width="9" height="10"></td>
  70.                 <td width="1" height="10"><spacer type="block" width="1" height="10"></td>
  71.                 <td width="80" height="10"><spacer type="block" width="80" height="10"></td>
  72.                 <td width="160" height="10"><spacer type="block" width="160" height="10"></td>
  73.             </tr>
  74.             <tr height="3">
  75.                 <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
  76.                 <td width="9" height="3"><spacer type="block" width="9" height="3"></td>
  77.                 <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
  78.                 <td width="80" height="3"><spacer type="block" width="80" height="3"></td>
  79.                 <td width="160" height="22" colspan="1" rowspan="2" valign="top" align="left" xpos="90">
  80.                     <csactioncntrl name="layer1" x="90" y="10" width="140" height="18" alignx="scale" aligny="top">
  81.                 </td>
  82.             </tr>
  83.             <tr height="19">
  84.                 <td width="1" height="19"><spacer type="block" width="1" height="19"></td>
  85.                 <td width="9" height="19"><spacer type="block" width="9" height="19"></td>
  86.                 <td width="1" height="19"><spacer type="block" width="1" height="19"></td>
  87.                 <td width="80" height="19" colspan="1" rowspan="1" valign="top" align="left" xpos="10">
  88.                     <csactioncntrl type="StaticText" value="Floating Box" x="10" y="13" width="70" height="17" alignx="left" aligny="top">
  89.                 </td>
  90.             </tr>
  91.             <tr height="3">
  92.                 <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
  93.                 <td width="9" height="3"><spacer type="block" width="9" height="3"></td>
  94.                 <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
  95.                 <td width="80" height="3"><spacer type="block" width="80" height="3"></td>
  96.                 <td width="160" height="27" colspan="1" rowspan="2" valign="top" align="left" xpos="90">
  97.                     <csactioncntrl name="layer2" x="90" y="32" width="140" height="18" alignx="scale" aligny="top">
  98.                 </td>
  99.             </tr>
  100.             <tr height="24">
  101.                 <td width="1" height="24"><spacer type="block" width="1" height="24"></td>
  102.                 <td width="9" height="24"><spacer type="block" width="9" height="24"></td>
  103.                 <td width="1" height="24"><spacer type="block" width="1" height="24"></td>
  104.                 <td width="80" height="24" colspan="1" rowspan="1" valign="top" align="left" xpos="10">
  105.                     <csactioncntrl type="StaticText" value="Floating Box" x="10" y="35" width="70" height="17" alignx="left" aligny="top">
  106.                 </td>
  107.             </tr>
  108.             <tr height="91">
  109.                 <td width="1" height="91"><spacer type="block" width="1" height="91"></td>
  110.                 <td width="9" height="91"><spacer type="block" width="9" height="91"></td>
  111.                 <td width="241" height="91" colspan="3" rowspan="1" valign="top" align="left" xpos="9">
  112.                     <csactioncntrl type="InfoText" value="This action returns true if both specified Floating Boxes will be intersected otherwise it returns false." x="9" y="59" width="231" height="41" alignx="scale" aligny="top">
  113.                 </td>
  114.             </tr>
  115.         </table>
  116.         </font></p>
  117.         <p> 
  118.     </body>
  119.  
  120. </html>
  121.